public class Boat4 implements Swimmer{
    protected String name;
    public Boat4(String name){
        this.name=name;
    }



    @Override
    public void swim(){
        System.out.printf("船在水面 %s 航行%n",name);
    }
}

